package com.zjq.springsocial.renren.api.impl.json;

import org.codehaus.jackson.Version;
import org.codehaus.jackson.map.module.SimpleModule;

import com.zjq.springsocial.renren.api.BasicInformation;
import com.zjq.springsocial.renren.api.Image;
import com.zjq.springsocial.renren.api.Like;
import com.zjq.springsocial.renren.api.RenrenEntity;
import com.zjq.springsocial.renren.api.School;
import com.zjq.springsocial.renren.api.User;
import com.zjq.springsocial.renren.api.Work;
import com.zjq.springsocial.renren.api.BasicInformation.HomeTown;
import com.zjq.springsocial.renren.api.Work.Industry;
import com.zjq.springsocial.renren.api.Work.Job;

/**
 * 
 *<P>
 *Jackson module for setting up mixin annotations on Facebook model types. This enables the use of Jackson annotations without
 * directly annotating the model classes themselves.
 *</P> 
 * @author zhongjingquan
 *
 * @version 0.0.1-SNAPSHOT 2013-7-18上午11:01:17
 */
public class RenrenModule extends SimpleModule {

	public RenrenModule() {
		super("RenrenModule", new Version(1, 0, 0, null));
	}
	
	@Override
	public void setupModule(SetupContext context) {
		context.setMixInAnnotations(RenrenEntity.class, RenrenEntityMixin.class);
		context.setMixInAnnotations(User.class, UserMixin.class);
		context.setMixInAnnotations(Image.class, ImageMixin.class);
		context.setMixInAnnotations(BasicInformation.class, BasicInformationMixin.class);
		context.setMixInAnnotations(HomeTown.class, HomeTownMixin.class);
		context.setMixInAnnotations(School.class, SchoolMixin.class);
		context.setMixInAnnotations(Work.class, WorkMixin.class);
		context.setMixInAnnotations(Industry.class, IndustryMixin.class);
		context.setMixInAnnotations(Job.class, JobMixin.class);
		context.setMixInAnnotations(Like.class, LikeMixin.class);
	}
}
